import { createStore, createLogger } from "vuex";
import state from "./state";
import mutations from "./mutations";
import * as getters from "./getters";
import * as actions from "./actions";
const debug = process.env.NODE_ENV !== "production"; //环境判断

export default createStore({
  state,
  getters,
  mutations,
  actions,
  strict: debug, //开发环境开启严格模式
  plugins: debug ? [createLogger()] : [],
});
